<template>
  <div>
    <el-row class="detail">
      <div :class="'state back' + dataForm.delFlag2">
        <div class="state-message">
          <p><span></span> 新增数据表任务</p>
          <p>任务说明：新增数据库中的新增数据表。</p>
          <p>
            <span>创建人：张三</span>
            <span>创建时间：2022-03-12 12:23:12</span>
            <span>最近一次更新时间：2022-03-12 12:23:12</span>
          </p>
        </div>
        <div class="state-icon">
          <i class="el-icon-refresh"></i>
          <p>未运行</p>
        </div>
      </div>

      <el-tabs v-model="activeName">
        <el-tab-pane label="概况信息" name="gkxx">
          <div class="divider">
            <span><em></em> 基本信息</span>
          </div>
          <el-row>
            <el-col :span="24">
              <p>数据源名称：数据源名称</p>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <p>数据源描述：数据源描述</p>
            </el-col>
          </el-row>
          <div class="divider">
            <span><em></em> 运转时间</span>
          </div>

          <el-row>
            <el-col :span="12">
              <p>日期：日期</p>
            </el-col>
            <el-col :span="12">
              <p>时间：时间</p>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <p>运转周期：运转周期</p>
            </el-col>
          </el-row>

          <div class="divider">
            <span><em></em> 数据来源</span>
          </div>

          <el-row>
            <el-col :span="12">
              <p>数据源：数据源</p>
            </el-col>
            <el-col :span="12">
              <p>数据库：数据库</p>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <p>数据表：数据表</p>
            </el-col>
          </el-row>
          <div class="divider">
            <span><em></em> 数据目标</span>
          </div>

          <el-row>
            <el-col :span="12">
              <p>数据源：数据源</p>
            </el-col>
            <el-col :span="12">
              <p>数据库：数据库</p>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <p>数据表：数据表</p>
            </el-col>
          </el-row>
          <el-row class="tableList">
            <el-col :span="24">
              <el-row>来源对应列</el-row>
              <el-table :data="tableData" border style="width: 100%">
                <el-table-column
                  prop="date"
                  show-overflow-tooltip
                  label="列名"
                ></el-table-column>
                <el-table-column
                  prop="name"
                  show-overflow-tooltip
                  label="类型"
                ></el-table-column>
                <el-table-column
                  prop="address"
                  show-overflow-tooltip
                  label="长度"
                >
                </el-table-column>
                <el-table-column
                  prop="date"
                  show-overflow-tooltip
                  label="来源数据表列名"
                ></el-table-column>
                <el-table-column
                  prop="name"
                  show-overflow-tooltip
                  label="类型"
                ></el-table-column>
                <el-table-column
                  prop="address"
                  show-overflow-tooltip
                  label="长度"
                >
                </el-table-column>
              </el-table>
            </el-col>
          </el-row>
        </el-tab-pane>
        <el-tab-pane label="运转日志" name="second"> 暂无运转日志 </el-tab-pane>
      </el-tabs>
    </el-row>
  </div>
</template>

<script>
export default {
  props: {
    detailsData: Object
  },
  components: {},
  data() {
    return {
      isName: "",
      activeName: "gkxx",
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄"
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄"
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄"
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄"
        }
      ],
      dataForm: {}
    };
  },
  methods: {},
  watch: {
    detailsData: {
      handler(val) {
        this.dataForm = Object.assign({}, val);
      },
      immediate: true
    }
  }
};
</script>
<style scoped lang="scss">
.detail {
  .state {
    color: #fff;
    background: rgba(239, 239, 239, 0.056);
    font-size: 0.12rem;
    padding: 0.2rem 0.1rem;
    margin-bottom: 0.12rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .state-message {
      p {
        &:first-child {
          margin-bottom: 0.05rem;
          font-size: 0.18rem;
          span {
            display: inline-block;
            width: 0.16rem;
            height: 0.16rem;
          }
        }
        &:last-child {
          margin-top: 0.2rem;
          font-size: 0.14rem;
          span {
            margin-right: 0.3rem;
          }
        }
      }
    }
    .state-icon {
      text-align: center;
      font-size: 0.2rem;
      i {
        font-size: 0.3rem;
        margin-bottom: 0.1rem;
      }
    }
  }
  .back0 .state-message p:first-child span {
    background: #ef8647;
  }
  .back0 .state-icon {
    color: #ef8647;
  }
  .back1 .state-message p:first-child span {
    background: #409eff;
  }
  .back1 .state-icon {
    color: #409eff;
  }
  .back2 .state-message p:first-child span {
    background: #67c23a;
  }
  .back2 .state-icon {
    color: #67c23a;
  }
  .back3 .state-message p:first-child span {
    background: #f56c6c;
  }
  .back3 .state-icon {
    color: #f56c6c;
  }
  .el-tabs {
    .el-tabs__content {
      .el-tab-pane {
        padding: 0;
        .el-row {
          color: #fff;
          font-size: 0.14rem;
          padding: 0.1rem 0;
          .el-col {
            padding-left: 0.2rem;
            p {
              padding-left: 0.2rem;
            }
          }
        }
      }
    }
  }
  .divider {
    font-size: 0.14rem;
    position: relative;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.1rem;
    span {
      background: #1e202d;
      position: relative;
      padding: 0 0.1rem;
      z-index: 1;
      em {
        display: inline-block;
        width: 0.1rem;
        height: 0.1rem;
        border-radius: 50%;
        background: #3078ff;
      }
    }
    &::before {
      content: "";
      position: absolute;
      width: 100%;
      height: 1px;
      background: #1f2b3d;
      top: calc(50% - 1px);
    }
  }
  .tableList::v-deep {
    .el-table {
      // background: transparent;
      td,
      th.is-leaf {
        line-height: 0.2rem;
        padding: 0.05rem;
        border-bottom: 1px solid #32333a;
        border-right: 1px solid #32333a;
      }
      th,
      tr {
        background-color: transparent;
      }
    }
  }
}
</style>
